﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Principal;
using System.Web;

namespace SvgApplication.Authorization
{
    public class AuthenticationPrincipal : IPrincipal
    {
        private IIdentity identity;
        private UserData userData;

        public AuthenticationPrincipal(IIdentity identity, UserData udata)
        {
            this.identity = identity;
            this.userData = udata;
        }


        public UserData UserData
        {
            get
            {
                return userData;
            }
        }


        #region IPrincipal Members

        public IIdentity Identity
        {
            get { return identity; }
        }

        public bool IsInRole(string role)
        {
            return true;
        }

        #endregion
    }
}